package com.itkang.singleton;

/**
 * <p>
 * 场景:
 * </p>
 *
 * @author york yuan
 * @version 1.0
 * @since 15/7/8下午3:47
 */
public class Country {
    /**
     * 使用静态内部类和静态对象实现单例
     */
    private static class init{
        private  static Country country = new Country();
    }

    private Country(){
        System.out.println("44");
    }


    public static Country getInstance() {
        System.out.println("4");
        return init.country;
    }
}
